package com.example.day05.exercise;

//矩形
public class Rect  extends  Shape {

    private  double len;
    private  double width;


    public Rect() {
    }

    public Rect(double len, double width) {
        this.len = len;
        this.width = width;
    }

    @Override
    public double printArea() {
        return  len*width;
    }

    @Override
    public double printgirth() {
        return (width+len)*2;
    }
}
